/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package actions;

import daos.Dao;
import daos.DaoFactory;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author C
 */
public class MostrarLoginUsuarioAction extends Action{

    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) {
        try {            
            Dao dao = DaoFactory.getDao("TipoUsuario");            
            ArrayList listaTipoUsuarios = (ArrayList) dao.select(null); 
            //System.out.println("tipo usuario" + listaTipoUsuarios.get(0).toString());
            request.setAttribute("lista_tipoUsuario", listaTipoUsuarios);            
            } catch (Exception ex) {            
                request.setAttribute("Error", ex.getMessage());
            }
         this.gotoPage("/loginUsuario.jsp", request, response); 
    }  
    
}
